<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var year = Number(prompt('请输入当前年份'))
    var month = Number(prompt('请输入当前月份'))
    var date = Number(prompt('请输入当前日期'))
    sum = 0
    switch(month){
        case 12: 
            sum = sum +30;
        
        case 11: 
            sum = sum +31;
        
        case 10: 
            sum = sum +30;
        
        case 9: 
            sum = sum +31;
        
        case 8: 
            sum = sum +31;
        
        case 7: 
            sum = sum +30;
        
        case 6: 
            sum = sum +31;
        
        case 5: 
            sum = sum +30;
        
        case 4: 
            sum = sum +31;
        
        case 3: 
            if(year%4 ==0 && year%100 !=0 || year%400 ==0){
                sum = sum + 29
            }else{
                sum = sum + 28
            }
            
        case 2: 
            sum = sum +31;
        
        case 1: 
            sum = sum +date;
        
    }
    console.log(year + '年' + month + '月' + date + '日' + '是这年的第' + sum + '天')
</script>
</html>